<%@page pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <%@include file="/WEB-INF/jsp/comm/head.jsp"%>
</head>
<body>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading">
        条件查询
        </div>
        <div class="panel-body">
           <form class="form-inline">
               <div class="form-group">
               <label>用户编号：</label>
               <input type="text" name="name" class="form-control"/>
               </div>
               <div class="form-group">
                   <label>起始日期：</label>
                   <input type="text" name="startDate" class="form-control"/>
               </div>
               <div class="form-group">
                   <label>结束日期：</label>
                   <input type="text" name="endDate" class="form-control"/>
               </div>
               <div class="form-group">
                  <button type="button" class="btn btn-danger" onclick="search()"><i class="glyphicon glyphicon-search"></i> 查询</button>
               </div>
           </form>
        </div>
    </div>
    <div id="toolbar">
        <button class="btn btn-primary" type="button" onclick="prepareGrant()"><i class="glyphicon glyphicon-user"></i> 用户授权</button>
        <button class="btn btn-info" type="button" onclick="prepareAdd()"><i class="glyphicon glyphicon-plus-sign"></i> 添加用户</button>
    </div>
    <table id="userTb"
    data-toggle="table"
    data-url="${ctx}/sys/user/search"
    data-striped="true"
    data-pagination="true"
    data-side-pagination="server"
    data-page-size="4"
    data-page-list="[4,8,12,16]"
    data-query-params="queryParams"
    data-toolbar="toolbar">
        <thead>
        <tr>
            <th data-radio="true"></th>
            <th data-field="name">用户编号</th>
            <th data-field="username">用户名称</th>
            <th data-field="tel">电话</th>
            <th data-field="role.name">角色名称</th>
            <th data-field="modifyTime">修改时间</th>
            <th>操作</th>
        </tr>
        </thead>
    </table>
</div>
<div id="grant">
    <table id="roleTb"
    data-toggle="table"
    data-url="${ctx}/sys/role/list">
        <thead>
        <tr>
        <th data-radio="true"></th>
        <th data-field="id">编号</th>
        <th data-field="name">名称</th>
        </tr>
        </thead>
    </table>
</div>
<div id="add">
    <form class="form-horizontal">
        <div class="form-group">
            <label class="col-md-2 control-label">姓名：</label>
            <div class="col-md-4">
                <input type="text" name="username" class="form-control"/>
            </div>
            <label class="col-md-2 control-label">性别：</label>
            <div class="col-md-4">
                <label class="radio-inline">
                    <input type="radio" name="sex" value="1" checked/>男
                </label>
                <label class="radio-inline">
                    <input type="radio" name="sex" value="0"/>女
                </label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">电话：</label>
            <div class="col-md-4">
                <input type="text" name="tel" class="form-control"/>
            </div>
            <label class="col-md-2 control-label">角色：</label>
            <div class="col-md-4">
                <select name="roleId" class="form-control">
                    <option value="">--请选择--</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">备注：</label>
            <div class="col-md-10">
                <div name="note"></div>
            </div>
        </div>
    </form>
</div>
<%@include file="/WEB-INF/jsp/comm/foot.jsp"%>
<script src="static/myjs/user.js"></script>
</body>
</html>
